<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout :: common_header(~{::title})">
    <title>商品主图点击数据-[[${T(com.b2c.erp.DataConfigObject).getInstance().getSysName()}]]</title>

</head>
<body th:replace="layout :: common_body(~{::div.layui-body})">
<div class="layui-body" style="padding:15px;">
    <div class="layui-tab layui-tab-brief" lay-filter="demo">
        <ul class="layui-tab-title">
             <li><a href="/ecom/goods_keyword_list"><img src="/images/shuzi0.jpeg" width="20px" height="20px" />关键词库</a></li>
            <li><a href="/ecom/goods_style_data_list"><img src="/images/shuzi1.jpeg" width="20px" height="20px" />测款数据</a></li>
            <li class="layui-this"><a href="/ecom/goods_img_data_list"><img src="/images/shuzi2.jpeg" width="20px" height="20px" />测图数据</a></li>
            <li><a href="/ecom/goods_style_refer_list"><img src="/images/shuzi3.jpeg" width="20px" height="20px" />选款参考</a></li>
            <li><a href="/ecom/article_list">电商知识库</a></li>
        </ul>
    </div>
    <!-- content starts -->
    <!--    <blockquote class="layui-elem-quote">订单总览</blockquote>-->

    <fieldset class="layui-elem-field">
        <legend>按条件搜索</legend>
        <div class="layui-field-box">
            <form class="layui-form layui-form-pane1" method="get" th:action="@{/ecom/goods_img_data_list}">

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <input type="text" name="num" th:value="${num}" placeholder="商品ID/商品编码" class="layui-input" autocomplete="off" style="width: 200px">
                    </div>
   
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <select name="platform" id="platform">
                                <option value="">平台</option>
                                <option value="TAO">淘宝</option>
                                <option value="PDD">拼多多</option>
                                <option value="DOU">抖音</option>
                            </select>
                        </div>
                    </div>


                    <div class="layui-inline">
                        <button type="submit" class="layui-btn">搜索</button>
                        <i>总共：<span style="color: red" th:text="${totalSize}"></span>条记录</i>
                    </div>
                    <div class="layui-inline">
                        <a href="javascript:;" id="add_data" class="layui-btn layui-btn-normal">添加数据</a>
                    </div>

                </div>

            </form>
        </div>
    </fieldset>

    <!-- start dd-wrapper -->
    <link rel="stylesheet" href="/goods/order.css"/>
    <div class="dd-wrapper">
        <table class="dd-table">
            <tr>
               <th>ID</th>
                <th>商品ID</th>
                <th>商品编码</th>
                <th>商品图片</th>
                <th>平台</th>
                <th>点击率</th>
                <th>统计日期</th>
                <th>备注</th>
                
                <th>创建时间</th>
   
            </tr>
            <tr th:each="item:${lists}">
               <td th:text="${item.id}"></td>

                <td>
                    <p th:text="${item.goodsId}"></p>
                </td>
                <td><p th:text="${item.goodsNum}"></p></td>
                <td>
                    <img th:src="${item.img}" width="50px" height="50px" /> 
                </td>
                <td><p th:text="${item.platform}"></p></td>
                <td><b th:text="${item.ctr}"></b>%</td>
                 <td>
                    <i th:text="${item.startDate}"></i> - <i th:text="${item.endDate}"></i>
                </td>
                <td><p th:text="${item.remark}"></p></td>
                <td th:text="${item.createTime}"></td>
              
            </tr>
        </table>
    </div>
    <!-- end dd-wrapper -->
    <div class="layui-box layui-laypage layui-laypage-default pageBox">
        <paging:pager th:value="${pageIndex}" th:rows="${totalSize}" th:size="${pageSize}"/>
    </div>


    <script type="text/javascript">
        var layer;
        var $;
        var windowOpen;


        layui.use(['laydate', 'jquery', 'form', 'layer'], function () {
            var laydate = layui.laydate;
            $ = layui.jquery;
            var form = layui.form;
            layer = layui.layer;
            laydate.render({
                elem: '#startTime'
                ,type:'year'
            });

          
   
            var platform = '[[${platform}]]';
            $("#platform").val(platform);
            form.render();

            $(function () {
                $("#add_data").click(function(){
                    layer.open({
                        type: 2,
                        title: '添加新数据',
                        shadeClose: true,
                        shade: 0.8,
                        area: ['600px', '65%'],
                        content: '/ecom/goods_img_data_add'
                    });
                })

            })
        });


    </script>


</div>
</body>
</html>
